<div id="tab-2" class="tab-item tab-survey">
    <div class="tab-item-content">
        <div class="tab-survey-main">
            <div class="tab-survey-header">
                <div class="survey-header-img">
                    <img src="<?php echo ROOT_URL; ?>public/images/note.png">
                </div>
                <div class="survey-header-content">
                    <p class="survey-header-title font-30">KHẢO SÁT TIÊU BIỂU</p>

                    <p class="font-arial-16">
                        <a class="survey" href=""><i class="fa fa-angle-right"></i> Giày dép của bạn </a>
                    </p>

                    <p class="font-arial-16">
                        <a class="survey" href=""><i class="fa fa-angle-right"></i> Làm cha mẹ </a>
                    </p>
                </div>
            </div>

            <div class="tab-survey-body">
                <div class="survey-item-row" style="margin-top: 30px">
                    <div class="survey-item">
                        <p class="font-24">THÔNG TIN CÁ NHÂN</p>
                        <span class="survey-item-icon survey-profile-icon"></span>
                        <?php
                            $number = 0;
                            foreach($s_information as $value){
                                ?>
                                    <p class="font-arial-16">
                                        <a sid="1" scid="<?php echo $value['scid']; ?>" title="<?php echo $value['survey_child_name']; ?>" class="survey" href="<?php echo ROOT_URL."account#survey/".$value['scid']; ?>"><i class="fa fa-angle-right"></i> <?php echo $value['survey_child_name']; ?> </a>
                                        <?php
                                            foreach($user_survey as $v){
                                                if($value['scid'] == $v['scid']){
                                                    echo '<i title="Đã được khảo sát" class="fa fa-check-circle"></i>';
                                                }
                                            }
                                            //number surveyed today
                                            if($s_information_count[$number]['number'] > 0){
                                                ?>
                                                    <span class="surveyed-now">
                                                        <label class="surveyed-plus">+</label><label class="surveyed-number"><?php echo $s_information_count[$number]['number']; ?></label>
                                                    </span>
                                                <?php
                                            }
                                        ?>
                                    </p>
                                <?php
                                $number++;
                            }
                        ?>
                    </div>

                    <div class="survey-item">
                        <p class="font-24">LÀM ĐẸP</p>
                        <span class="survey-item-icon survey-beautiful-icon"></span>
                        <?php
                            $number = 0;
                            foreach($s_beautiful as $value){
                                ?>
                                    <p class="font-arial-16">
                                        <a sid="2" scid="<?php echo $value['scid']; ?>" title="<?php echo $value['survey_child_name']; ?>" class="survey" href="<?php echo ROOT_URL."account#survey/".$value['scid']; ?>"><i class="fa fa-angle-right"></i> <?php echo $value['survey_child_name']; ?> </a>
                                        <?php
                                            foreach($user_survey as $v){
                                                if($value['scid'] == $v['scid']){
                                                    echo '<i title="Đã được khảo sát" class="fa fa-check-circle"></i>';
                                                }
                                            }
                                            //number surveyed today
                                            if($s_beautiful_count[$number]['number'] > 0){
                                                ?>
                                                    <span class="surveyed-now">
                                                            <label class="surveyed-plus">+</label><label class="surveyed-number"><?php echo $s_beautiful_count[$number]['number']; ?></label>
                                                    </span>
                                                 <?php
                                            }
                                        ?>
                                    </p>
                                <?php
                                $number++;
                            }
                        ?>
                    </div>
                </div>

                <div class="survey-item-row">
                    <div class="survey-item">
                        <p class="font-24">HỘ GIA ĐÌNH</p>
                        <span class="survey-item-icon survey-family-icon"></span>

                        <?php
                            $number = 0;
                            foreach($s_family as $value){
                                ?>
                                    <p class="font-arial-16">
                                        <a sid="3" scid="<?php echo $value['scid']; ?>" title="<?php echo $value['survey_child_name']; ?>" class="survey" href="<?php echo ROOT_URL."account#survey/".$value['scid']; ?>"><i class="fa fa-angle-right"></i> <?php echo $value['survey_child_name']; ?> </a>
                                        <?php
                                            foreach($user_survey as $v){
                                                if($value['scid'] == $v['scid']){
                                                    echo '<i title="Đã được khảo sát" class="fa fa-check-circle"></i>';
                                                }
                                            }
                                            //number surveyed today
                                            if($s_family_count[$number]['number'] > 0){
                                                ?>
                                                    <span class="surveyed-now">
                                                        <label class="surveyed-plus">+</label><label class="surveyed-number"><?php echo $s_family_count[$number]['number']; ?></label>
                                                    </span>
                                                <?php
                                            }
                                        ?>
                                    </p>
                                <?php
                                $number++;
                            }
                        ?>
                    </div>
                    <div class="survey-item">
                        <p class="font-24">SỨC KHỎE VÀ THỂ THAO</p>
                        <span class="survey-item-icon survey-sport-icon"></span>

                        <!--<p class="font-arial-16"><a class="survey" href=""><i class="fa fa-angle-right"></i> Sức khỏe của bạn </a></p>

                        <p class="font-arial-16"><a class="survey" href=""><i class="fa fa-angle-right"></i> Sức khỏe hộ gia đình </a></p>

                        <p class="font-arial-16"><a class="survey" href=""><i class="fa fa-angle-right"></i> Thính giác và thị lực </a></p>

                        <p class="font-arial-16"><a class="survey" href=""><i class="fa fa-angle-right"></i> Thể thao và luyện tập </a></p>-->
                        <?php
                            $number = 0;
                            foreach($s_sport as $value){
                                ?>
                                    <p class="font-arial-16">
                                        <a sid="4" scid="<?php echo $value['scid']; ?>" title="<?php echo $value['survey_child_name']; ?>" class="survey" href="<?php echo ROOT_URL."account#survey/".$value['scid']; ?>"><i class="fa fa-angle-right"></i> <?php echo $value['survey_child_name']; ?> </a>
                                        <?php
                                            foreach($user_survey as $v){
                                                if($value['scid'] == $v['scid']){
                                                    echo '<i title="Đã được khảo sát" class="fa fa-check-circle"></i>';
                                                }
                                            }
                                            //number surveyed today
                                            if($s_sport_count[$number]['number'] > 0){
                                                ?>
                                                    <span class="surveyed-now">
                                                        <label class="surveyed-plus">+</label><label class="surveyed-number"><?php echo $s_sport_count[$number]['number']; ?></label>
                                                    </span>
                                                <?php
                                            }
                                        ?>
                                    </p>
                                <?php
                                $number++;
                            }
                        ?>
                    </div>
                </div>

                <div class="survey-item-row">
                    <div class="survey-item">
                        <p class="font-24">CÔNG VIỆC</p>
                        <span class="survey-item-icon survey-work-icon"></span>

                        <!--<p class="font-arial-16"><a class="survey" href=""><i class="fa fa-angle-right"></i> Phân loại việc làm </a></p>

                        <p class="font-arial-16"><a class="survey" href=""><i class="fa fa-angle-right"></i> Phân loại ngành nghề </a></p>

                        <p class="font-arial-16"><a class="survey" href=""><i class="fa fa-angle-right"></i> Kích cỡ công ty </a></p>

                        <p class="font-arial-16"><a class="survey" href=""><i class="fa fa-angle-right"></i> Quyết định kinh doanh </a></p>-->
                        <?php
                            $number = 0;
                            foreach($s_work as $value){
                                ?>
                                    <p class="font-arial-16">
                                        <a sid="5" scid="<?php echo $value['scid']; ?>" title="<?php echo $value['survey_child_name']; ?>" class="survey" href="<?php echo ROOT_URL."account#survey/".$value['scid']; ?>"><i class="fa fa-angle-right"></i> <?php echo $value['survey_child_name']; ?> </a>
                                        <?php
                                            foreach($user_survey as $v){
                                                if($value['scid'] == $v['scid']){
                                                    echo '<i title="Đã được khảo sát" class="fa fa-check-circle"></i>';
                                                }
                                            }
                                            //number surveyed today
                                            if($s_work_count[$number]['number'] > 0){
                                                ?>
                                                    <span class="surveyed-now">
                                                        <label class="surveyed-plus">+</label><label class="surveyed-number"><?php echo $s_work_count[$number]['number']; ?></label>
                                                    </span>
                                                <?php
                                            }
                                        ?>
                                    </p>
                                <?php
                                $number++;
                            }
                        ?>

                    </div>
                    <div class="survey-item">
                        <p class="font-24">MUA SẮM</p>
                        <span class="survey-item-icon survey-shop-icon"></span>

                        <!--<p class="font-arial-16"><a class="survey" href=""><i class="fa fa-angle-right"></i> Mua sắm nói chung </a></p>

                        <p class="font-arial-16"><a class="survey" href=""><i class="fa fa-angle-right"></i> Mua sắm cho cả gia định </a></p>

                        <p class="font-arial-16"><a class="survey" href=""><i class="fa fa-angle-right"></i> Những xu hướng mới </a></p>

                        <p class="font-arial-16"><a class="survey" href=""><i class="fa fa-angle-right"></i> Thói quen mua sắm </a></p>

                        <p class="font-arial-16"><a class="survey" href=""><i class="fa fa-angle-right"></i> Chương trình khách hàng thân
                                thiết </a></p>-->
                        <?php
                            $number = 0;
                            foreach($s_sales as $value){
                                ?>
                                    <p class="font-arial-16">
                                        <a sid="6" scid="<?php echo $value['scid']; ?>" title="<?php echo $value['survey_child_name']; ?>" class="survey" href="<?php echo ROOT_URL."account#survey/".$value['scid']; ?>"><i class="fa fa-angle-right"></i> <?php echo $value['survey_child_name']; ?> </a>
                                        <?php
                                            foreach($user_survey as $v){
                                                if($value['scid'] == $v['scid']){
                                                    echo '<i title="Đã được khảo sát" class="fa fa-check-circle"></i>';
                                                }
                                            }
                                            //number surveyed today
                                            if($s_sales_count[$number]['number'] > 0){
                                                ?>
                                                    <span class="surveyed-now">
                                                        <label class="surveyed-plus">+</label><label class="surveyed-number"><?php echo $s_sales_count[$number]['number']; ?></label>
                                                    </span>
                                                <?php
                                            }
                                        ?>
                                    </p>
                                <?php
                                $number++;
                            }
                        ?>
                    </div>
                </div>

                <div class="survey-item-row">
                    <div class="survey-item">
                        <p class="font-24">CÔNG NGHỆ</p>
                        <span class="survey-item-icon survey-technology-icon"></span>

                        <!--<p class="font-arial-16"><a class="survey" href=""><i class="fa fa-angle-right"></i> Điện thoại di động </a></p>

                        <p class="font-arial-16"><a class="survey" href=""><i class="fa fa-angle-right"></i> Thiết bị điện tử </a></p>

                        <p class="font-arial-16"><a class="survey" href=""><i class="fa fa-angle-right"></i> Hoạt động trực tuyến </a></p>

                        <p class="font-arial-16"><a class="survey" href=""><i class="fa fa-angle-right"></i> Nhà cung cấp mạng điện
                                thoại </a></p>

                        <p class="font-arial-16"><a class="survey" href=""><i class="fa fa-angle-right"></i> Sử dụng điện thoại thông
                                minh </a></p>-->
                        <?php
                            $number = 0;
                            foreach($s_tech as $value){
                                ?>
                                    <p class="font-arial-16">
                                        <a sid="7" scid="<?php echo $value['scid']; ?>" title="<?php echo $value['survey_child_name']; ?>" class="survey" href="<?php echo ROOT_URL."account#survey/".$value['scid']; ?>"><i class="fa fa-angle-right"></i> <?php echo $value['survey_child_name']; ?> </a>
                                        <?php
                                            foreach($user_survey as $v){
                                                if($value['scid'] == $v['scid']){
                                                    echo '<i title="Đã được khảo sát" class="fa fa-check-circle"></i>';
                                                }
                                            }
                                            //number surveyed today
                                            if($s_tech_count[$number]['number'] > 0){
                                                ?>
                                                    <span class="surveyed-now">
                                                        <label class="surveyed-plus">+</label><label class="surveyed-number"><?php echo $s_tech_count[$number]['number']; ?></label>
                                                    </span>
                                                <?php
                                            }
                                        ?>
                                    </p>
                                <?php
                                $number++;
                            }
                        ?>

                    </div>
                    <div class="survey-item">
                        <p class="font-24">THỨC ĂN VÀ ĐỒ UỐNG</p>
                        <span class="survey-item-icon survey-eat-icon"></span>

                        <!--<p class="font-arial-16"><a class="survey" href=""><i class="fa fa-angle-right"></i> Thói quen ăn uống </a></p>

                        <p class="font-arial-16"><a class="survey" href=""><i class="fa fa-angle-right"></i> Thức uống có cồn </a></p>

                        <p class="font-arial-16"><a class="survey" href=""><i class="fa fa-angle-right"></i> Hoạt động ăn uống hàng ngày </a>
                        </p>

                        <p class="font-arial-16"><a class="survey" href=""><i class="fa fa-angle-right"></i> Ăn ngoài </a></p>-->
                        <?php
                            $number = 0;
                            foreach($s_eat as $value){
                                ?>
                                    <p class="font-arial-16">
                                        <a sid="8" scid="<?php echo $value['scid']; ?>" title="<?php echo $value['survey_child_name']; ?>" class="survey" href="<?php echo ROOT_URL."account#survey/".$value['scid']; ?>"><i class="fa fa-angle-right"></i> <?php echo $value['survey_child_name']; ?> </a>
                                        <?php
                                            foreach($user_survey as $v){
                                                if($value['scid'] == $v['scid']){
                                                    echo '<i title="Đã được khảo sát" class="fa fa-check-circle"></i>';
                                                }
                                            }
                                            //number surveyed today
                                            if($s_eat_count[$number]['number'] > 0){
                                                ?>
                                                    <span class="surveyed-now">
                                                        <label class="surveyed-plus">+</label><label class="surveyed-number"><?php echo $s_eat_count[$number]['number']; ?></label>
                                                    </span>
                                                <?php
                                            }
                                        ?>
                                    </p>
                                <?php
                                $number++;
                            }
                        ?>
                    </div>
                </div>

                <div class="survey-item-row" style="margin-bottom: 40px">
                    <div class="survey-item">
                        <p class="font-24">GIẢI TRÍ</p>
                        <span class="survey-item-icon survey-entertainment-icon"></span>

                        <!--<p class="font-arial-16"><a class="survey" href=""><i class="fa fa-angle-right"></i> Tạp chí </a></p>

                        <p class="font-arial-16"><a class="survey" href=""><i class="fa fa-angle-right"></i> Thời gian dành cho giải chí </a>
                        </p>-->
                        <?php
                            $number = 0;
                            foreach($s_entertainment as $value){
                                ?>
                                    <p class="font-arial-16">
                                        <a sid="9" scid="<?php echo $value['scid']; ?>" title="<?php echo $value['survey_child_name']; ?>" class="survey" href="<?php echo ROOT_URL."account#survey/".$value['scid']; ?>"><i class="fa fa-angle-right"></i> <?php echo $value['survey_child_name']; ?> </a>
                                        <?php
                                            foreach($user_survey as $v){
                                                if($value['scid'] == $v['scid']){
                                                    echo '<i title="Đã được khảo sát" class="fa fa-check-circle"></i>';
                                                }
                                            }
                                            //number surveyed today
                                            if($s_entertainment_count[$number]['number'] > 0){
                                                ?>
                                                    <span class="surveyed-now">
                                                        <label class="surveyed-plus">+</label><label class="surveyed-number"><?php echo $s_entertainment_count[$number]['number']; ?></label>
                                                    </span>
                                                <?php
                                            }
                                        ?>
                                    </p>
                                <?php
                                $number++;
                            }
                        ?>

                    </div>
                    <div class="survey-item">
                        <p class="font-24">SỞ THÍCH</p>
                        <span class="survey-item-icon survey-music-icon"></span>

                        <!--<p class="font-arial-16"><a class="survey" href=""><i class="fa fa-angle-right"></i> Sở thích </a></p>-->
                        <?php
                            $number = 0;
                            foreach($s_interest as $value){
                                ?>
                                    <p class="font-arial-16">
                                        <a sid="10" scid="<?php echo $value['scid']; ?>" title="<?php echo $value['survey_child_name']; ?>" class="survey" href="<?php echo ROOT_URL."account#survey/".$value['scid']; ?>"><i class="fa fa-angle-right"></i> <?php echo $value['survey_child_name']; ?> </a>
                                        <?php
                                            foreach($user_survey as $v){
                                                if($value['scid'] == $v['scid']){
                                                    echo '<i title="Đã được khảo sát" class="fa fa-check-circle"></i>';
                                                }
                                            }
                                            //number surveyed today
                                            if($s_interest_count[$number]['number'] > 0){
                                                ?>
                                                    <span class="surveyed-now">
                                                        <label class="surveyed-plus">+</label><label class="surveyed-number"><?php echo $s_interest_count[$number]['number']; ?></label>
                                                    </span>
                                                <?php
                                            }
                                        ?>
                                    </p>
                                <?php
                                $number++;
                            }
                        ?>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="tab-survey-single" style="display: none">

</div>

<script>
    $(function(){
        $('.survey').click(function(e){
            e.preventDefault();
            var sid = $(this).attr('sid');
            var scid = $(this).attr('scid');
            $.ajax({
                type:"POST",
                url:"account/getSurveySingle",
                data:{'sid': sid, 'scid': scid},
                success:(function(data){
                    $('.tab-survey-single').html(data);
                    $('.survey-wrapper').show("drop", {
                        direction: "up"
                    })
                })
            });
            window.history.pushState("", "", Root_url+"account#survey");
            $('.tab-survey-single').show();
        });
    });
</script>